package com.chapter01exercise.homework03;

/**
 * @Author 小闽
 * @Date 2024/8/16 8:54
 * @PackageName: com.chapter01exercise.homework03
 * @ClassName: Teacher
 * @Description: 教师类
 * @Version 1.0
 */
public class Teacher {
    private String name;
    private int age;
    private String post;
    private double salary;

    /**
     * 构造器
     * @param name
     * @param age
     * @param post
     * @param salary
     */
    public Teacher(String name, int age, String post, double salary) {
        this.name = name;
        this.age = age;
        this.post = post;
        this.salary = salary;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getPost() {
        return post;
    }

    public void setPost(String post) {
        this.post = post;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
    /**
     * 输出教师信息方法
     */
    public void introduce(){
        System.out.println("姓名：" + name + "年龄：" + age + "职称：" + post + "基本工资：" + salary);
    }
}
